<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="divport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            background-color: aliceblue;
            position: relative;
        }

        .box-img {
            background-color: aliceblue;
            width: 750rpx;
            height: 1666rpx;

        }

        .box-ball-bg-out {
            position: absolute;
            top: 200rpx;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;

        }

        .box-ball-bg {
            width: 750rpx;
        }

        .ball-container {
            position: absolute;
            top: 140rpx;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
        }

        .ball-container-img {
            width: 580rpx;
        }

        .box-botton {
            height: 120px;
            width: 650rpx;
            position: absolute;
            bottom: 70rpx;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
        }

        .box-bottom-start {
            width: 180rpx;
            position: absolute;
            left: 50rpx;
            top: 80rpx;
        }

        .box-bottom-port-out {
            position: absolute;
            right: 50rpx;
            top: 80rpx;
            overflow: hidden;
        }

        .box-bottom-port {
            width: 100rpx;

        }

        .ball {
            width: 90rpx;
            height: 90rpx;
            position: absolute;
            bottom: 30rpx;
            left: 30rpx;
            position: absolute;
            z-index: 20;
        }

        .box-botton-ball {
            width: 90rpx;
            height: 90rpx;
            position: absolute;
            top: -90rpx;
            left: 8rpx;
            position: absolute;
            z-index: 20;
            transition: .5s;
        }

        .box-botton-ball-active {
            top: 20rpx;
        }

        /* 中奖 */
        .open-box {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, .2);
            position: fixed;
            left: 0;
            top: 0;
            z-index: 999;
        }

        .open-box-img {
            width: 200rpx;
            height: 200rpx;
            background: #fff;
            display: flex;
            justify-content: center;
            align-items: center;
        }
    </style>
</head>

<body>
    <div class="box">
        <img class="box-img" src="https://hdg.faisys.com/image/xyndj_new/homeBg.jpg"></image>
        <div class="box-ball-bg-out">
            <img class="box-ball-bg" mode="widthFix" src="https://hdg.faisys.com/image/xyndj_new/thomasBox.png">
            </image>
            <div class="ball-container" id="ball-container">
                <img class="ball-container-img" mode="widthFix"
                    src="https://hdg.faisys.com/image/xyndj_new/thomasBg.png">
                </image>
                <!-- 存放小球位置 -->
                <img class="ball" v-for="(item,index) in balls" :key="index"
                    :style="{left:item.posX+'px',bottom:item.posY+'px'}" mode="scaleToFill" :src="item.url"></image>
                <img class="ball" id="ball" style="opacity: 0;" mode="widthFix"
                    src="https://hdg.faisys.com/image/xyndj_new/egg3.png"></image>


            </div>
            <div class="box-botton">
                <img @click="startGame" class="box-bottom-start" mode="widthFix"
                    src="https://hdg.faisys.com/image/xyndj_new/startBtn.png"></image>
                <div class="box-bottom-port-out">
                    <img class="box-bottom-port" mode="widthFix" src="https://hdg.faisys.com/image/xyndj_new/exit.png">
                    </image>
                    <!-- 进球 -->
                    <img :class="['box-botton-ball',openning?'box-botton-ball-active':'']" id="ballAni" mode="widthFix"
                        src="https://hdg.faisys.com/image/xyndj_new/egg3.png"></image>
                </div>
            </div>
        </div>
        <div class="open-box" v-if="showResultDialog" @click="showResultDialog=false">
            <div class="open-box-img">中大奖了</div>
        </div>
    </div>
</body>

</html>